package com.abapi.pay.admin.controller;

import com.abapi.cloud.common.protocol.Result;
import com.abapi.pay.admin.support.db.service.PayBackInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Author ldx
 * @Date 2019/11/1 15:59
 * @Description
 * @Version 1.0.0
 */
@RestController
@RequestMapping("pay/back")
public class BackController {

    @Autowired
    PayBackInfoService payBackInfoService;

    @GetMapping("v1/{projectName}/{payType}/{payMethod}")
    public Result back(@PathVariable String projectName, @PathVariable String payType, @PathVariable String payMethod
            , HttpServletRequest request, HttpServletResponse response){
        return payBackInfoService.handle(projectName,payType,payMethod,request,response);
    }

}
